const express = require('express');
const router = express.Router();
const authMiddleware = require('../middleware/auth');
const commentController = require('../controllers/commentController');

// 添加评论（需要身份验证）
router.post('/:id/comments', authMiddleware, commentController.addComment);

// 获取文章的所有评论
router.get('/:id/comments', commentController.getComments);

module.exports = router;